package org.example.mylogin.config;

import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.example.mylogin.interceptors.TokenInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

//注册器
@Configuration
@Slf4j
public class WebConfig implements WebMvcConfigurer {
    @Resource
    private TokenInterceptor tokenInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(tokenInterceptor)
//                .excludePathPatterns("/**");
//                .addPathPatterns("/**")
//                .excludePathPatterns("/**/login");

    }
}
